package com.ciaojian.core.mapper;

import com.ciaojian.core.model.MarketScanRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 扫码领券记录表 Mapper 接口
 * </p>
 *
 * @author Atlakyn
 * @since 2021-03-26
 */
public interface MarketScanRecordMapper extends BaseMapper<MarketScanRecord> {
    /**
     * 用户领的这张券的数量
     *
     * @param userId   用户id
     * @param marketScanId 券码类型id
     * @return 领券数量
     */
    Integer countTakeCode(@Param("userId") Integer userId, @Param("marketScanId") Integer marketScanId);
}
